<!DOCTYPE html>
<html>
	<?
	include 'web/header.phtml';
	?>
	<body>

		<?
		include 'web/body.header.phtml';
		include 'web/body.menu.phtml';
		?>

		<div id="page">

			<?
			include 'web/body.banner.phtml';
			?>

			<div id="content">
				<div class="box" id="box3">
					<h2 class="title1">Product</h2>
					<div class="entry">

						<div style="clear: both; margin-bottom: 20px;"></div>
						<div style="float: left">
							<ul class="list2">

								<?php
								$date = date('Y-m-d H:i:s');
								if (count($products) == 0) {
									echo "There is no any Product in Cart";
								} else {
									echo "<table class='AccountTable'>
								<thead><th>ID</th><th>Name</th><th>Quantity</th><th>Price</th><th>Total Price</th></thead>";

									foreach ($products as $product) {
										echo "
									
									
									<tr><td>$product[ProductID]</td><td>$product[Name]</td><td>$product[Quantity]</td><td>$product[Price]" . '.$' . "</td><td>$product[TotalPrice]" . '.00$' . "</td></tr>
									
									
									
									";
									}

									echo "<tr><td colspan=4>Total</td><td><b>$total" . '.00$' . "</b></td></tr></table>";
								}
								?>
							</ul>
						</div>
						<div style="float: left">
							<ul class="list2">
								<form action=cart.php method=get>
								<table class='AccountTable' width=350>
									<thead>
										<th colspan=2>Bill Information</th>
									</thead>

									<input type=hidden name='Account' value=<?= $_SESSION['username'] ?>>
									<tr>
										<td>Account</td><td><?= $_SESSION['username'] ?></td>
									</tr>

									<input type=hidden name='Date' value=<?= $date ?> >
									<tr>
										<td>Date</td><td><?= $date ?> </td>
									</tr>

									<tr>
										<td>Address</td><td>
										<input type=text name='Address' />
										</td>
									</tr>

									<input type=hidden name='Payment' value=<?= $total ?>>
									<tr>
										<td>Payment</td><td><b><?= $total ?>.00$</b></td>
									</tr>

									<tr>
										<td colspan=2>
										<input type=submit name=Submit value='Payment' >
										</td>
									</tr>
								</table>
								</form>
							</ul>
						</div>
					</div>
				</div>
			</div>

		</div>

		<?
		include 'web/body.wrapper.phtml';
		?>
	</body>
</html>